let { imgUrl } = getApp().globalData
Page({
  data: {
    appInfo: getApp(),
    ossImg: `${imgUrl}/applet_web_images/new_image`,
    list: [{
      id: 1,
      name: '订单问题',
      page: '/page/customerService/helpCenter/helpCenter',
      img:`${imgUrl}/applet_web_images/new_image/customer_service/order.png`
    },{
      id: 2,
      name: '支付问题',
      page: '/page/customerService/helpCenter/helpCenter',
      img:`${imgUrl}/applet_web_images/new_image/customer_service/pay.png`
    },{
      id: 3,
      name: '发货问题',
      page: '/page/customerService/helpCenter/helpCenter',
      img: `${imgUrl}/applet_web_images/new_image/customer_service/send_out_goods.png`
    },{
      id: 4,
      name: '售后问题',
      page: '/page/customerService/helpCenter/helpCenter',
      img: `${imgUrl}/applet_web_images/new_image/customer_service/after_sales.png`
    },{
      id: 5,
      name: '归还问题',
      page: '/page/customerService/helpCenter/helpCenter',
      img:`${imgUrl}/applet_web_images/new_image/customer_service/return.png`
    }]
  },
  onLoad({platform}) {
 
    my.setNavigationBar({
      frontColor: '#000000',
      backgroundColor: '#f6f6f6'
    })
    let app = getApp()
    app.setShareChannel(platform)
  },
  onShow() {
     // 设置返回按钮样式
     my.setBackButton({ 
      color: "#F6F6F6", 
    }); 
  },
  jumpPage({target:{dataset: {url, id}}}) {
    my.navigateTo({
      url: `${url}?id=${id}`
    })
  },
  callPhone() {
    let app = getApp();
    my.makePhoneCall({
      number: app.globalData.service_phone,
    });
  }
});
